package com.zbkj.crmeb.member.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 商户会员权益表
 * </p>
 *
 * @author xx
 * @since 2022-05-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("eb_merchant_member_benefits")
@ApiModel(value="MerchantMemberBenefits对象", description="商户会员权益表")
public class MerchantMemberBenefits extends Model<MerchantMemberBenefits> {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "商户会员权益表id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商户id")
    private Integer merId;

    @ApiModelProperty(value = "权益类型，1优惠券，2折扣，3积分")
    private Integer equityType;

    @ApiModelProperty(value = "展示名称")
    private String displayName;

    @ApiModelProperty(value = "权益图标地址")
    private String equityIconUrl;

    @ApiModelProperty(value = "权益简介")
    private String introduction;

    @ApiModelProperty(value = "会员权益启用标志0未启用，1启用")
    private Boolean equityEnableFlag;

    @ApiModelProperty(value = "关联优惠券id多个逗号隔开")
    private String associatedCouponId;

    @ApiModelProperty(value = "折扣比例")
    private BigDecimal discountRatio;

    @ApiModelProperty(value = "折扣条件1全部商品，2指定商品")
    private Integer discountConditions;

    @ApiModelProperty(value = "积分倍数")
    private BigDecimal pointsMultiple;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
